<%--
    Document   : home
    Created on : May 15, 2012, 5:52:35 PM
    Author     : Long Nguyen
--%>
<%@page import="com.myapp.c0910g.entity.ShipType"%>
<%@page import="com.myapp.c0910g.DAO.ShipTypeDAO"%>
<%@page import="com.myapp.c0910g.Utility.Constant"%>
<%@page import="com.myapp.c0910g.DTO.UserRadioDTO"%>
<%@page import="com.myapp.c0910g.entity.PaymentType"%>
<%@page import="java.util.List"%>
<%@page import="com.myapp.c0910g.DAO.PaymentTypeDAO"%>
<html lang="en"><head>
        <meta charset="utf-8">
        <title>Dashboard I Admin Panel</title>
        <link rel="stylesheet" href="../resources/css/layout2.css" type="text/css" media="screen">
        <script src="../resources/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="../resources/scripts/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>
        <script src="../resources/scripts/hideshow.js" type="text/javascript"></script>
        <script src="../resources/scripts/jquery.tablesorter.min.js" type="text/javascript"></script>
        <script src="../resources/scripts/jquery.equalHeight.js" type="text/javascript"></script>
        <script type="text/javascript">
            jQuery(document).ready(function(){
                jQuery(".tablesorter").tablesorter();
                //When page loads...
                jQuery(".tab_content").hide(); //Hide all content
                jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab
                jQuery(".tab_content:first").show(); //Show first tab content

                //On Click Event
                jQuery("ul.tabs li").click(function() {

                    jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
                    jQuery(this).addClass("active"); //Add "active" class to selected tab
                    jQuery(".tab_content").hide(); //Hide all tab content

                    var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
                    jQuery(activeTab).fadeIn(); //Fade in the active ID content
                    return false;
                });

            });
        </script>
        <script type="text/javascript">
            jQuery(function(){
                jQuery('.column').equalHeight();
            });
        </script>
    </head>
    <%
                ShipTypeDAO shiptypeDAO = new ShipTypeDAO();
                List<ShipType> lstshipType = shiptypeDAO.getAllShipType();
                UserRadioDTO user = (UserRadioDTO) session.getAttribute(Constant.DATAINFOR);
    %>
    <body>
        <div id="header" style="background-color: black;height: 50px;margin-top: -15px;">
            <h1 class="site_title" style="background: black;font-weight: 400;color: white;"><a href="admin.jsp" style="color: white;">Radio Cabs</a></h1>
            <h2 class="section_title" style="margin-left: 600px;margin-top: -30px;color: white;">Dashboard</h2>
            <div class="btn_view_site" style="margin-left: 1150px;margin-top: -50px;"><a href="../Home/home.jsp">Home Page</a></div>
        </div> <!-- end of header bar -->

        <div id="secondary_bar">
            <div class="user">
                <%if (user != null) {%>
                <p><%=user.getuRadioName()%></p>
                <a class="logout_user" title="Logout" id="btnOut">Logout</a>
                <%} else {
                    response.sendRedirect("../Home/home.jsp");%>
                <%}%>
            </div>
            <div class="breadcrumbs_container">
                <div class="breadcrumbs"><a href="admin.jsp">Admin</a> <div class="breadcrumb_divider"></div> <a class="current">Payment</a></div>
            </div>
        </div><!-- end of secondary bar -->

        <div id="sidebar" class="column" style="height:740px; ">
            <form class="quick_search">
                <input type="text" value="Quick Search" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;">
            </form>
            <hr>
            <h3>Content</h3>
            <ul class="toggle">
                <li class="icn_new_article"><a href="statistic.jsp">Statistics</a></li>
                <li class="icn_edit_article"><a href="feedback.jsp">Feedback</a></li>
            </ul>
            <h3>Members</h3>
            <ul class="toggle">
                <li class="icn_add_user"><a href="admin.jsp">Administrators</a></li>
                <li class="icn_add_user"><a href="userrole.jsp">Role</a></li>
            </ul>
            <h3>Services</h3>
            <ul class="toggle">
                <li class="icn_photo"><a href="shiptype.jsp"><b>Ship Type</b></a></li>
                <li class="icn_photo"><a href="payment.jsp">Payment Type</a></li>
                <li class="icn_photo"><a href="paymentdetail.jsp">Payment Details</a></li>
            </ul>
        </div><!-- end of sidebar -->

        <div id="main" class="column" style="height:650px; ">

            <h4 class="alert_info">Show Ship type</h4>

            <div class="module width_full">
                <div><h3 class="tabs_involved">Ship type</h3>
                </div>

                <div class="tab_container">
                    <div id="tab1" class="tab_content" style="display: block; ">
                        <table id="tblPayment" class="tablesorter" cellspacing="0">
                            <thead>
                                <tr>
                                    <th class="header" style="font-size: 12px;">Id</th>
                                    <th class="header headerSortUp" style="font-size:12px;">Name type</th>
                                </tr>
                            </thead>
                            <tbody>
                                <%for (ShipType stype : lstshipType) {%>
                                <tr id="<%=lstshipType.indexOf(stype)%>">
                                    <td><%=stype.getShipTypeID()%></td>
                                    <td><%=stype.getShipTypeName()%></td>
                                </tr>
                                <%}%>
                            </tbody>
                        </table>
                    </div><!-- end of #tab1 -->

                </div><!-- end of .tab_container -->

            </div><!-- end of content manager article -->
        </div>
    </body></html>